Skip to content

Take the heading and course positive to the right in the planner, controllers and examples - #90

Draft
1-Bort-1 wants to merge 2 commits into
mainfrom
agent/89-follow-kiteutils-right-handed-heading-an
Draft

1-Bort-1 wants to merge 2 commits into
mainfrom
agent/89-follow-kiteutils-right-handed-heading-an

Conversation

@1-Bort-1

Copy link
Copy Markdown
Member

Depends-On: OpenSourceAWE/KiteUtils.jl release after v0.14.2
Depends-On: OpenSourceAWE/KiteModels.jl#362

The next KiteUtils release flips the sign of the heading and the course. Zero still points towards zenith, but +90° now means the nose (or the velocity) points to the right as seen from the ground station. KiteModels follows in OpenSourceAWE/KiteModels.jl#362, so the heading and course the controllers receive change sign. This branch makes the controllers and examples expect that convention, so the autopilot flies the same figure of eight and the parking controller parks the same way as before.

The flight path controller already worked internally with the heading positive to the right. The planner flipped the heading and course before handing them over. That flip is gone, so the controller sees exactly the numbers it saw before.

The flight path planner switches between turns on heading thresholds. Each threshold is mirrored (ψ → 360° − ψ), so every turn ends at the same physical direction as before. One setting changes meaning with it: the upper turn's heading threshold is now 25° instead of 335°. The default, the four shipped settings files and the changelog (BREAKING) say so. A user's own settings file that sets it takes 360° minus its old value.

The examples that compute the heading themselves now call KiteModels' heading getter without the "negate the azimuth" option, which KiteModels removes. That option gave a heading a few degrees off the geometric one, depending on the azimuth. The examples now steer on the geometric heading, the same one the system state carries. The flights below show that this costs nothing.

The parking controller example now takes the heading and its set value positive to the right. It still returns the kite model's steering, so the parking examples that call it stay unchanged. Its own tests are re-derived: the mirrored inputs give the same steering and the mirrored turn rates. Two of its seven checks were already failing on main, with stale references for the steering and the turn rate. Those references are re-derived along with the rest.

I put the sign of the steering into the parking example's inversion block rather than negating its output at each caller. The flight path controller does the opposite, and the examples negate its output. I left that alone because changing a public function's output sign would break every user's call.

The KiteUtils compatibility bound moves once its release is out. That release also needs WinchControllers, KiteViewers and KitePodModels to accept the new KiteUtils.

Run time: unchanged. Only signs and comparisons change, and the 1000 s batch runs took the same wall time.

Verification

  • Reproduced first, on main: a heading of +30° reached the controller as −30°. The planner stayed in the upper turn at 340° but left it at 185°. It left the low turn at 146°, the left turn at 204° and the right turn at 156°, each the mirror of the new thresholds.

  • test/test-heading_convention.jl (new): red on main (the controller and planner checks fail), green after.

  • The new test plus test-fpp_settings, test-model_and_control, test-flightpathcontroller and test-kiteobserver: 154/154 pass.

  • Parking controller example tests: 7/7 pass (5/7 on main).

  • Batch autopilot, 1000 s per project. All nine runs complete, average power in W. main is the code as shipped. The branch's inputs come from the installed KiteModels with the heading and course mirrored: "today's" uses the examples' old heading, "geometric" uses the heading KiteModels now gives.

    Project main branch, today's heading branch, geometric heading
    hydra20_600_TI0 13211.3 13212.8 13183.0
    hydra10_951 4825.3 4826.9 4786.9
    hydra20_426 5984.8 5984.8 6022.6
  • The mirroring is exact: the system state's old heading equals 360° minus the right-handed geometric heading, to 0.01° at each of ten samples of a steered flight.

  • Docs build completes; its warnings are about functions this branch does not touch.

  • Not run: the examples against the KiteUtils and KiteModels branches themselves. The mirrored inputs above stand in for them, since KiteModels' pull request reports the four-point model's flight as bit-identical.

  • Local full suite on this head: PASS (15 min, exit 0, Julia 1.13.4). GitHub CI: starts when the pull request opens; it installs today's KiteUtils, whose heading has the old sign, so it checks only the sign-free parts until the release.

  • Benchmark: n/a

  • Risk: a caller that feeds the planner or the system state control its own heading in the old convention now steers the mirror image, with no error.

Opened by 1-Bort-1, an AI agent working for @1-Bart-1.
Closes #89 · task KiteControllers.jl-89
Refs OpenSourceAWE/KiteUtils.jl#194

1-Bort-1 and others added 2 commits November 14, 2026 01:34
The flight path controller already worked with the heading positive to
the right, so the planner stops negating the heading and course it is
given. The planner's turn thresholds and the default of
heading_upper_turn (335 -> 25 degrees) are mirrored to match, and the
parking controller example takes the new sign.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KiteModels' calc_heading(kps) loses its neg_azimuth keyword with the
right-handed heading, so the examples that compute the heading
themselves call it without one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added the agent:running Agent task state label Nov 19, 2026
@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:review Agent task state and removed agent:running Agent task state agent:ci Agent task state labels Nov 19, 2026
@1-Bort-1
1-Bort-1 requested a review from 1-Bart-1 November 19, 2026 14:04

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:review Agent task state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow KiteUtils' right-handed heading and course in the controllers:...

1 participant